bitkeeper revision 1.1760.1.1 (42c0e8fa-Uxs1rA3BiXdTbynda9HmA)
authorvh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>
Tue, 28 Jun 2005 06:06:50 +0000 (06:06 +0000)
committervh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>
Tue, 28 Jun 2005 06:06:50 +0000 (06:06 +0000)
convert some use of "if (condition) BUG()" to "BUG_ON(condition)" in netback driver.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c

index 02f0c2fc5150fc0d0e223874656035f5389b03b0..faf6458083fabab332d646c49620e4d004286cfe 100644 (file)
@@ -297,8 +297,7 @@ static void net_rx_action(unsigned long unused)
         netif->stats.tx_packets++;
 
         /* The update_va_mapping() must not fail. */
-        if ( unlikely(mcl[0].result != 0) )
-            BUG();
+        BUG_ON(mcl[0].result != 0);
 
         /* Check the reassignment error code. */
         status = NETIF_RSP_OKAY;
@@ -441,8 +440,7 @@ static void net_tx_action(unsigned long unused)
     while ( dealloc_cons != dp )
     {
         /* The update_va_mapping() must not fail. */
-        if ( unlikely(mcl[0].result != 0) )
-            BUG();
+        BUG_ON(mcl[0].result != 0);
 
         pending_idx = dealloc_ring[MASK_PEND_IDX(dealloc_cons++)];
 
@@ -794,8 +792,8 @@ static int __init netback_init(void)
     
     netif_interface_init();
 
-    if ( (mmap_vstart = allocate_empty_lowmem_region(MAX_PENDING_REQS)) == 0 )
-        BUG();
+    mmap_vstart = allocate_empty_lowmem_region(MAX_PENDING_REQS);
+    BUG_ON(mmap_vstart == 0);
 
     for ( i = 0; i < MAX_PENDING_REQS; i++ )
     {